﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes.bonus {
    import Classes.*;

    public class MallBonus extends HarvestBonus {

        private var m_featureName:String;
        protected var m_visitBoost:Number = 0;

        public function MallBonus(_arg1:XML){
            super(_arg1);
            this.m_featureName = _arg1.@featureName;
            this.m_visitBoost = _arg1.@visitPercent;
        }
        override public function init(_arg1:MapResource):void{
            var _local4:Object;
            var _local5:int;
            var _local6:String;
            var _local2:int;
            var _local3:Object = (_arg1 as Mall).getMechanicData()["harvestState"];
            if (((_local3) && (!((_local3["visitors"] == null))))){
                _local4 = _local3["visitors"];
                _local5 = 0;
                for (_local6 in _local4) {
                    _local5++;
                };
                _local2 = (_local5 * this.m_visitBoost);
            };
            m_percentModifier = (initialPercentModifier + _local2);
        }
        override public function get maxPercentModifier():Number{
            return (m_percentModifier);
        }

    }
}//package Classes.bonus 
